package net.lijingye.education.entity;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Created by LijingYe on 2016/4/4.
 */
@Entity
@Table(name = "source_score")
public class SourceScore implements Serializable {
    @Id
    @OneToOne
    @JoinColumn(name = "sourceId")
    private Source source;
    @Id
    @OneToOne
    @JoinColumn(name = "userId")
    private User user;
    @Column(name = "score")
    private int score;

    public SourceScore() {
    }

    public SourceScore(Source source, User user, int score) {
        this.source = source;
        this.user = user;
        this.score = score;
    }

    public Source getSource() {
        return source;
    }

    public void setSource(Source source) {
        this.source = source;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

}
